//============================================================================================
/**
 * @file	pkthln_clact.h
 * @brief	ポケスロン競技アクター関連
 * @author	Nozomu Saito
 */
//============================================================================================
#ifndef __PKTHLN_CLACT_H__
#define __PKTHLN_CLACT_H__

#include "system/clact_util_res.h"

#define RESOURCE_NUM	(4)
typedef struct PKTHLN_CLACT_CNT_tag * PKTHLN_CLACT_CNT_PTR;
typedef struct PKTHLN_ACT_tag * PKTHLN_ACT_PTR;

typedef struct PKTHLN_ACT_SETUP_PRM_tag
{
	int EntryNum;				//管理OBJ数
	int ResCodeMax;				//リソース識別数最大値
	u8 ResNum[RESOURCE_NUM];	//OBJ・PAL・CELL・ANM
}PKTHLN_ACT_SETUP_PRM;

extern PKTHLN_CLACT_CNT_PTR PkthlnClAct_Init(	const int inHeapID, const PKTHLN_ACT_SETUP_PRM *inSetupPrm);

extern void PkthlnClAct_Free(PKTHLN_CLACT_CNT_PTR cnt_ptr);

extern void PkthlnClAct_SetResObjCode(	PKTHLN_CLACT_CNT_PTR cnt_ptr,
										const int inIndex, const u8 inCode);

extern void PkthlnClAct_SetChar(PKTHLN_CLACT_CNT_PTR cnt_ptr,
								const int inArcID, const int inArcIdx,
								const int inResCode, const int inVramType);
extern void PkthlnClAct_SetPaltt(	PKTHLN_CLACT_CNT_PTR cnt_ptr,
									const int inArcID, const int inArcIdx,
									const int inResCode, const int inVramType, const u8 inPalNum	);

extern void PkthlnClAct_SetCell(PKTHLN_CLACT_CNT_PTR cnt_ptr,
								const int inArcID, const int inArcIdx, const int inResCode);

extern void PkthlnClAct_SetAnm(	PKTHLN_CLACT_CNT_PTR cnt_ptr,
								const int inArcID, const int inArcIdx, const int inResCode );

extern void PkthlnClAct_Trans(PKTHLN_CLACT_CNT_PTR cnt_ptr);

extern PKTHLN_ACT_PTR PkthlnClAct_SetGetActor(	PKTHLN_CLACT_CNT_PTR cnt_ptr, const int inBGPriority,
											const NNS_G2D_VRAM_TYPE inDrawArea,
											const u8 inResCode, const u8 inActCode);
extern CLACT_WORK_PTR PkthlnClAct_SetActor(	PKTHLN_CLACT_CNT_PTR cnt_ptr, const int inBGPriority,
											const NNS_G2D_VRAM_TYPE inDrawArea,
											const u8 inResCode, const u8 inActCode);

extern PKTHLN_ACT_PTR PkthlnClAct_GetActPtr(PKTHLN_CLACT_CNT_PTR cnt_ptr, const u8 inResCode, const u8 inActCode);

extern void PkthlnClAct_SetActive(PKTHLN_ACT_PTR ptr, const u16 inActive, const u8 inVisible);
extern void PkthlnClAct_ChgAnm(PKTHLN_ACT_PTR ptr, const int inIdx);
extern void PkthlnClAct_ChgAnmCheck(PKTHLN_ACT_PTR ptr, const int inIdx);
extern void PkthlnClAct_SetPos(PKTHLN_ACT_PTR ptr, const VecFx32 *inVec);
extern const VecFx32 *PkthlnClAct_GetPos(PKTHLN_ACT_PTR ptr);
extern void PkthlnClAct_SetScaleAffine(PKTHLN_ACT_PTR ptr, const VecFx32* inScale, const int inAffine);
extern void PkthlnClAct_SetRotationAffine(PKTHLN_ACT_PTR ptr, const u16 inRot, const int inAffine);
extern void PkthlnClAct_SetAffine(PKTHLN_ACT_PTR ptr, const int inAffine);
extern CLACT_WORK_PTR PkthlnClAct_GetClActWorkPtr(PKTHLN_ACT_PTR ptr);

extern void PkthlnClAct_Draw(PKTHLN_CLACT_CNT_PTR cnt_ptr);

extern void PkthlnClAct_SetDispDistance(PKTHLN_CLACT_CNT_PTR cnt_ptr,
										const fx32 inMX, const fx32 inMY,
										const fx32 inSX, const fx32 inSY );

extern CLACT_SET_PTR PkthlnClAct_GetClActSetAdr(PKTHLN_CLACT_CNT_PTR cnt_ptr);

extern CLACT_U_RES_OBJ_PTR * PkthlnClAct_GetResObjPtrAdr(	PKTHLN_CLACT_CNT_PTR cnt_ptr,
													const int inResCode, const u8 inResIdx );
extern void PkthlnClAct_SetPriority(PKTHLN_ACT_PTR ptr, const u32 inPriority);
extern BOOL PkthlnClAct_AnmActiveCheck(PKTHLN_ACT_PTR ptr);

extern void PkthlnClAct_AllAnmStop(PKTHLN_CLACT_CNT_PTR cnt_ptr, const u8 inStop);

#endif	//__PKTHLN_CLACT_H__